package com.test.springboot_test.test01_mybatisplus.domain;

import com.baomidou.mybatisplus.annotation.*;
import com.test.springboot_test.test01_mybatisplus.annotation.MyAnnotation;
import jakarta.validation.constraints.Max;
import jakarta.validation.constraints.Min;
import jakarta.validation.constraints.NotNull;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

@Data
@AllArgsConstructor
@NoArgsConstructor
@TableName("employee")
public class Employee {
    //id
    @TableId(type = IdType.AUTO)
    private Integer id;
    //邮件
    private String email;
    //姓名
    @NotNull
    @MyAnnotation("这是一个自定义注解的测试")
    private String name;
    //密码
    @NotNull
    @Min(value=3,message = "密码最少是3位")
    @Max(value=6,message = "密码最大是6位")
    private Integer password;

    //逻辑删除：0表示未删除，1表示删除
    @TableLogic(value = "0", delval = "1")
    private Integer deleted;

}
